#!/usr/bin/env python
# -*- coding:utf-8 -*-

from flask_restful import Api

from . import todolist_blueprint
from api.todolistResource.todolistResource import TodolistResource
from api.todolistResource.todolistOtherResource import TodolistOtherResource

api = Api(todolist_blueprint)

api.add_resource(TodolistResource, '/todolist/<AutoID>', '/todolist', endpoint='todolist')

@todolist_blueprint.route("/add_list", methods=['POST'], endpoint="AddList")
def add_list():
    return TodolistOtherResource.add_list()

@todolist_blueprint.route("/fuzzy_query", methods=['GET'], endpoint="FuzzyQuery")
def fuzzy_query():
    return TodolistOtherResource.fuzzy_query()